package com.cayden.components.dubbo;

import ch.qos.logback.classic.Level;
import com.cayden.config.log.LogbackConfigurator;
import com.cayden.config.log.initializer.AbstractLogInitializer;

/**
 * @author cayden
 * @date 2021-10-27 10:52
 */
public class DubboMonitorLogInitializer extends AbstractLogInitializer {
    @Override
    public void init(LogbackConfigurator configurator) {
        if (configurator
                .getEnvironment()
                .getProperty("cayden.dubbo.enable", Boolean.class, Boolean.TRUE)) {
            configurator.logger("com.alibaba.dubbo.monitor.dubbo.DubboMonitor", Level.WARN);
        }
    }
}
